package com.mrgood;

import com.mrgood.config.Context;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableFeignClients
@SpringBootApplication
public class SvcC {

    private final static Logger logger = LoggerFactory.getLogger(SvcC.class);

    public static void main(String[] args) {
        logger.info("availableProcessors={}", Runtime.getRuntime().availableProcessors());
        SpringApplication.run(SvcC.class, args);
    }

    @GetMapping("/pathc")
    public String get() {
        Context context = new Context();
        context.mark("svc-c", "0.2");
        return context.push("msg from c");
    }
}
